package com.ruoyi.ora.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.AppConfigMapper;
import com.ruoyi.ora.domain.AppConfig;
import com.ruoyi.ora.service.IAppConfigService;

/**
 * app设置Service业务层处理
 * 
 * @author liuwp
 * @date 2024-12-16
 */
@Service
public class AppConfigServiceImpl implements IAppConfigService 
{
    @Autowired
    private AppConfigMapper appConfigMapper;

    /**
     * 查询app设置
     * 
     * @param id app设置主键
     * @return app设置
     */
    @Override
    public AppConfig selectAppConfigById(Long id)
    {
        return appConfigMapper.selectAppConfigById(id);
    }

    /**
     * 查询app设置列表
     * 
     * @param appConfig app设置
     * @return app设置
     */
    @Override
    public List<AppConfig> selectAppConfigList(AppConfig appConfig)
    {
        return appConfigMapper.selectAppConfigList(appConfig);
    }

    /**
     * 根据业务主键查询一条记录：app设置
     *
     * @param appConfig app设置
     * @return app设置
     */
    @Override
    public AppConfig selectOneAppConfig(AppConfig appConfig)
    {
        return appConfigMapper.selectOneAppConfig(appConfig);
    }

    /**
     * 新增app设置
     * 
     * @param appConfig app设置
     * @return 结果
     */
    @Override
    public int insertAppConfig(AppConfig appConfig)
    {
        appConfig.setCreateTime(DateUtils.getNowDate());
        return appConfigMapper.insertAppConfig(appConfig);
    }

    /**
     * 修改app设置
     * 
     * @param appConfig app设置
     * @return 结果
     */
    @Override
    public int updateAppConfig(AppConfig appConfig)
    {
        appConfig.setUpdateTime(DateUtils.getNowDate());
        return appConfigMapper.updateAppConfig(appConfig);
    }

    @Override
    public int updateAppConfigCondition(AppConfig appConfig, AppConfig appConfigCondition)
    {
                appConfig.setUpdateTime(DateUtils.getNowDate());
        return appConfigMapper.updateAppConfigCondition(appConfig, appConfigCondition);
    }

    /**
     * 批量删除app设置
     * 
     * @param ids 需要删除的app设置主键
     * @return 结果
     */
    @Override
    public int deleteAppConfigByIds(Long[] ids)
    {
        return appConfigMapper.deleteAppConfigByIds(ids);
    }

    /**
     * 删除app设置信息
     * 
     * @param id app设置主键
     * @return 结果
     */
    @Override
    public int deleteAppConfigById(Long id)
    {
        return appConfigMapper.deleteAppConfigById(id);
    }

    /**
     * 条件删除app设置
     *
     * @param appConfig app设置
     * @return 结果
     */
    @Override
    public int deleteAppConfigByCondition(AppConfig appConfig)
    {
        return appConfigMapper.deleteAppConfigByCondition(appConfig);
    }

}
